package cn.edu.ustc.xrovers.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

@Entity
@Table
public class NonFinancialInfoRatio {

	private Integer id;
	private double csr;//成本结构
	private double tar;//行业成熟期
	private double cir;//行业受周期性影响程度
	private double tpr;//行业盈利性
	private double per;//法律政策环境
	private double tdr;//行业依赖性
	private double psr;//产品替代性
	private double esr;//企业规模
	private double pvr;//产品多样化
	private double dpr;//企业所处发展阶段
	private double mcr;//市场竞争情况
	private double mar;//管理层的经验和素质
	private double msr;//管理层稳定性
	private double fmar;//财务管理能力
	private double ldr;//法律纠纷
	private double icmr;//内部控制与管理
	private NonFinancialInformation nfi;
	
	@Column(name="NonRatio_CyclicityInfluence")
	public double getCir() {
		return cir;
	}
	@Column(name="NonRatio_CostStructure")
	public double getCsr() {
		return csr;
	}
	@Column(name="NonRatio_DevelopPhase")
	public double getDpr() {
		return dpr;
	}
	@Column(name="NonRatio_EnterpriseScale")
	public double getEsr() {
		return esr;
	}
	@Column(name="NonRatio_FinancialManageAbility")
	public double getFmar() {
		return fmar;
	}
	@Column(name="NonRatio_InternalControlManagement")
	public double getIcmr() {
		return icmr;
	}
	@Id
	@GenericGenerator(name ="pkGenerator",strategy="foreign" , parameters={@Parameter(name="property",value="nfi")})
	@GeneratedValue(generator="pkGenerator")
	public Integer getId() {
		return id;
	}
	@Column(name="NonRatio_LegalDispute")
	public double getLdr() {
		return ldr;
	}
	@Column(name="NonRatio_ManageAbility")
	public double getMar() {
		return mar;
	}
	@Column(name="NonRatio_MarketCompetition")
	public double getMcr() {
		return mcr;
	}
	@Column(name="NonRatio_ManageStability")
	public double getMsr() {
		return msr;
	}
	@OneToOne(cascade=CascadeType.ALL)
	@JoinColumn(name="NFIRatio_NonFinaInfo")
	public NonFinancialInformation getNfi() {
		return nfi;
	}
	@Column(name="NonRatio_PolicyEnvironment")
	public double getPer() {
		return per;
	}
	@Column(name="NonRatio_ProductSubstitute")
	public double getPsr() {
		return psr;
	}
	@Column(name="NonRatio_ProductVariety")
	public double getPvr() {
		return pvr;
	}
	@Column(name="NonRatio_TradeAutumn")
	public double getTar() {
		return tar;
	}
	@Column(name="NonRatio_TradeDependence")
	public double getTdr() {
		return tdr;
	}
	@Column(name="NonRatio_TradeProfit")
	public double getTpr() {
		return tpr;
	}
	
	
	/*set方法*/
	public void setCir(double cir) {
		this.cir = cir;
	}
	public void setCsr(double csr) {
		this.csr = csr;
	}
	public void setDpr(double dpr) {
		this.dpr = dpr;
	}
	public void setEsr(double esr) {
		this.esr = esr;
	}
	public void setFmar(double fmar) {
		this.fmar = fmar;
	}
	public void setIcmr(double icmr) {
		this.icmr = icmr;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public void setLdr(double ldr) {
		this.ldr = ldr;
	}
	public void setMar(double mar) {
		this.mar = mar;
	}
	public void setMcr(double mcr) {
		this.mcr = mcr;
	}
	public void setMsr(double msr) {
		this.msr = msr;
	}
	public void setNfi(NonFinancialInformation nfi) {
		this.nfi = nfi;
	}
	public void setPer(double per) {
		this.per = per;
	}
	public void setPsr(double psr) {
		this.psr = psr;
	}
	public void setPvr(double pvr) {
		this.pvr = pvr;
	}
	public void setTar(double tar) {
		this.tar = tar;
	}
	public void setTdr(double tdr) {
		this.tdr = tdr;
	}
	public void setTpr(double tpr) {
		this.tpr = tpr;
	}
}
